#include "JdbcConstants.h"

DbType JdbcConstants::JTDS = DbType::jtds;

string_ptr JdbcConstants::MOCK = make_string_ptr("mock");

DbType JdbcConstants::HSQL = DbType::hsql;

DbType JdbcConstants::DB2 = DbType::db2;

string_ptr JdbcConstants::DB2_DRIVER = make_string_ptr("com.ibm.db2.jcc.DB2Driver");       // Type4
string_ptr JdbcConstants::DB2_DRIVER2 = make_string_ptr("COM.ibm.db2.jdbc.app.DB2Driver"); // Type2
string_ptr JdbcConstants::DB2_DRIVER3 = make_string_ptr("COM.ibm.db2.jdbc.net.DB2Driver"); // Type3

DbType JdbcConstants::POSTGRESQL = DbType::postgresql;
string_ptr JdbcConstants::POSTGRESQL_DRIVER = make_string_ptr("org.postgresql.Driver");

DbType JdbcConstants::SYBASE = DbType::sybase;

DbType JdbcConstants::SQL_SERVER = DbType::sqlserver;
string_ptr JdbcConstants::SQL_SERVER_DRIVER = make_string_ptr("com.microsoft.jdbc.sqlserver.SQLServerDriver");
string_ptr JdbcConstants::SQL_SERVER_DRIVER_SQLJDBC4 = make_string_ptr("com.microsoft.sqlserver.jdbc.SQLServerDriver");
string_ptr JdbcConstants::SQL_SERVER_DRIVER_JTDS = make_string_ptr("net.sourceforge.jtds.jdbc.Driver");

DbType JdbcConstants::ORACLE = DbType::oracle;
string_ptr JdbcConstants::ORACLE_DRIVER = make_string_ptr("oracle.jdbc.OracleDriver");
string_ptr JdbcConstants::ORACLE_DRIVER2 = make_string_ptr("oracle.jdbc.driver.OracleDriver");

DbType JdbcConstants::JdbcConstants::ALI_ORACLE = DbType::ali_oracle;
string_ptr ALI_ORACLE_DRIVER = make_string_ptr("com.alibaba.jdbc.AlibabaDriver");

DbType JdbcConstants::MYSQL = DbType::mysql;
string_ptr JdbcConstants::MYSQL_DRIVER = make_string_ptr("com.mysql.jdbc.Driver");
string_ptr JdbcConstants::MYSQL_DRIVER_6 = make_string_ptr("com.mysql.cj.jdbc.Driver");
string_ptr JdbcConstants::MYSQL_DRIVER_603 = make_string_ptr("com.mysql.cj.api.MysqlConnection");
string_ptr JdbcConstants::MYSQL_DRIVER_REPLICATE = make_string_ptr("com.mysql.jdbc.");

string_ptr JdbcConstants::MARIADB = make_string_ptr("mariadb");
string_ptr JdbcConstants::MARIADB_DRIVER = make_string_ptr("org.mariadb.jdbc.Driver");

DbType JdbcConstants::TIDB = DbType::tidb;
string_ptr JdbcConstants::TIDB_DRIVER = make_string_ptr("io.tidb.bigdata.jdbc.TiDBDriver");

DbType JdbcConstants::DERBY = DbType::derby;

string_ptr JdbcConstants::HBASE = make_string_ptr("hbase");

DbType JdbcConstants::HIVE = DbType::hive;
string_ptr JdbcConstants::HIVE_DRIVER = make_string_ptr("org.apache.hive.jdbc.HiveDriver");

DbType JdbcConstants::H2 = DbType::h2;
string_ptr JdbcConstants::H2_DRIVER = make_string_ptr("org.h2.Driver");

DbType JdbcConstants::DM = DbType::dm;
string_ptr JdbcConstants::DM_DRIVER = make_string_ptr("dm.jdbc.driver.DmDriver");

DbType JdbcConstants::KINGBASE = DbType::kingbase;
string_ptr JdbcConstants::KINGBASE_DRIVER = make_string_ptr("com.kingbase.Driver");
string_ptr JdbcConstants::KINGBASE8_DRIVER = make_string_ptr("com.kingbase8.Driver");

DbType JdbcConstants::GBASE = DbType::gbase;
string_ptr JdbcConstants::GBASE_DRIVER = make_string_ptr("com.gbase.jdbc.Driver");

DbType JdbcConstants::XUGU = DbType::xugu;
string_ptr JdbcConstants::XUGU_DRIVER = make_string_ptr("com.xugu.cloudjdbc.Driver");

DbType JdbcConstants::OCEANBASE = DbType::oceanbase;
DbType JdbcConstants::OCEANBASE_ORACLE = DbType::oceanbase_oracle;
string_ptr JdbcConstants::OCEANBASE_DRIVER = make_string_ptr("com.alipay.oceanbase.jdbc.Driver");
string_ptr JdbcConstants::OCEANBASE_DRIVER2 = make_string_ptr("com.oceanbase.jdbc.Driver");

DbType JdbcConstants::INFORMIX = DbType::informix;

/**
 * 阿里云odps
 */
DbType JdbcConstants::ODPS = DbType::odps;
string_ptr JdbcConstants::ODPS_DRIVER = make_string_ptr("com.aliyun.odps.jdbc.OdpsDriver");

string_ptr JdbcConstants::TERADATA = make_string_ptr("teradata");
string_ptr JdbcConstants::TERADATA_DRIVER = make_string_ptr("com.teradata.jdbc.TeraDriver");

/**
 * Log4JDBC
 */
string_ptr JdbcConstants::LOG4JDBC = make_string_ptr("log4jdbc");
string_ptr JdbcConstants::LOG4JDBC_DRIVER = make_string_ptr("net.sf.log4jdbc.DriverSpy");

string_ptr JdbcConstants::PHOENIX = make_string_ptr("phoenix");
string_ptr JdbcConstants::PHOENIX_DRIVER = make_string_ptr("org.apache.phoenix.jdbc.PhoenixDriver");
DbType JdbcConstants::ENTERPRISEDB = DbType::edb;
string_ptr JdbcConstants::ENTERPRISEDB_DRIVER = make_string_ptr("com.edb.Driver");

string_ptr JdbcConstants::KYLIN = make_string_ptr("kylin");
string_ptr JdbcConstants::KYLIN_DRIVER = make_string_ptr("org.apache.kylin.jdbc.Driver");

string_ptr JdbcConstants::SQLITE = make_string_ptr("sqlite");
string_ptr JdbcConstants::SQLITE_DRIVER = make_string_ptr("org.sqlite.JDBC");

string_ptr JdbcConstants::ALIYUN_ADS = make_string_ptr("aliyun_ads");
DbType JdbcConstants::ALIYUN_DRDS = DbType::drds;

string_ptr JdbcConstants::PRESTO = make_string_ptr("presto");
string_ptr JdbcConstants::PRESTO_DRIVER = make_string_ptr("com.facebook.presto.jdbc.PrestoDriver");

string_ptr JdbcConstants::TRINO = make_string_ptr("trino");
string_ptr JdbcConstants::TRINO_DRIVER = make_string_ptr("io.trino.jdbc.TrinoDriver");

string_ptr JdbcConstants::ELASTIC_SEARCH = make_string_ptr("elastic_search");

string_ptr JdbcConstants::ELASTIC_SEARCH_DRIVER = make_string_ptr("com.alibaba.xdriver.elastic.jdbc.ElasticDriver");

DbType JdbcConstants::CLICKHOUSE = DbType::clickhouse;
string_ptr JdbcConstants::CLICKHOUSE_DRIVER = make_string_ptr("ru.yandex.clickhouse.ClickHouseDriver");

string_ptr JdbcConstants::KDB = make_string_ptr("kdb");
string_ptr JdbcConstants::KDB_DRIVER = make_string_ptr("com.inspur.jdbc.KdDriver");

/**
 * Aliyun PolarDB
 */
DbType JdbcConstants::POLARDB = DbType::polardb;
string_ptr JdbcConstants::POLARDB_DRIVER = make_string_ptr("com.aliyun.polardb.Driver");
/**
 * GreenPlum
 */
DbType JdbcConstants::GREENPLUM = DbType::greenplum;
string_ptr JdbcConstants::GREENPLUM_DRIVER = make_string_ptr("com.pivotal.jdbc.GreenplumDriver");

/**
 * oscar
 */
DbType JdbcConstants::OSCAR = DbType::oscar;
string_ptr JdbcConstants::OSCAR_DRIVER = make_string_ptr("com.oscar.Driver");

DbType JdbcConstants::TYDB = DbType::tydb;
string_ptr JdbcConstants::TYDB_DRIVER = make_string_ptr("com.dbcp.jdbc.Driver");
